using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input.Touch;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Media;
using System.Diagnostics;


namespace amazingfishing
{
    class option : Microsoft.Xna.Framework.DrawableGameComponent
    {
        private SpriteBatch spritebatch;
        private Texture2D optionTexture;
        public option (Game game): base(game){}
        protected override void LoadContent()
        {
            spritebatch = new SpriteBatch(Game.GraphicsDevice);
            optionTexture = Game.Content.Load<Texture2D>(@"images/optionmenu");
            base.LoadContent();
        }
        public override void Update(GameTime gameTime)
        {
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
                ((Game1)Game).currentState = Game1.GameState.on_menu;
            base.Update(gameTime);
        }
        public override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);
            spritebatch.Begin();
            spritebatch.Draw(optionTexture,new Rectangle(0, 0, 480, 800), null, Color.White,
                0, Vector2.Zero, SpriteEffects.None, 0);
            spritebatch.End();
            //SpriteBatch
            base.Draw(gameTime);
        }
    }
}
